<?
require_once("conf/config.php");
require_once("conf/database.php");
include("includes/tools.php");
$result=processRequest();
echo $result;

function getCentreLocList(){

	$cityName=$_REQUEST["city"];
	$city_list=qry_data("select distinct centre_location from bkc_centre_list where city='".$cityName."' order by centre_location asc");
	$resultLoc[]='---Select Location---';
	foreach ($city_list as $key => $value) {
		$resultLoc[$value["centre_location"]]=$value["centre_location"];
	}

	return createSelect("centre_location", $resultLoc,  $selected = $centre["centre_location"],"");

}


function processRequest(){

	$processAction=$_REQUEST["action"];
	switch ($processAction) {
		case 'centreloc':
			return getCentreLocList();
			break;
		
		default:
			
			break;
	}

}
?>